import { createRouter, createWebHistory } from 'vue-router';

const routes = [
    {
        path: '/charity',
        name: 'Charity',
        component: () => import('@/views/the-Charity.vue')
    },
    {
        path: '/charity-org',
        name: 'CharityOrg',
        component: () => import('@/views/CharityOrg.vue')
    },
    {
        path: '/regulator',
        name: 'Regulator',
        component: () => import('@/views/Regulator.vue')
    },
    {
        path: '/beneficiary',
        name: 'Beneficiary',
        component: () => import('@/views/Beneficiary.vue')
    },
    {
        path: '/donor',
        name: 'Donor',
        component: () => import('@/views/Donor.vue')
    },
    {
        path: '/accountLogin',
        name: 'AccountLogin',
        component: () => import('@/views/AccountLogin.vue')
    },
    {
        path: '/accountRegister',
        name: 'AccountRegister',
        component: () => import('@/views/AccountRegister.vue')
    }
];

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
});

// 路由跳转的拦截
// router.beforeEach((to, from, next) => {
//
// });

export default router;